package com.heima.Text;

import com.baidu.aip.imageprocess.AipImageProcess;
import com.baidu.aip.ocr.AipOcr;
import com.heima.minio.Application;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import java.util.HashMap;

@RunWith(SpringRunner.class)
@SpringBootTest(classes = Application.class)
public class text1 {
@Autowired
    private AipOcr aipOcr;
  @Test
public  void  text() throws JSONException {
      JSONObject jsonObject = aipOcr.basicGeneral("D:\\WeGameApps\\Desktop\\111\\514FB26932114185B35ABCEC17E4DF89.jpg", new HashMap<>());
      System.out.println(jsonObject.toString(2));
  }

}
